import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
// 导入Element Plus
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
// 导入Element Plus图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

const app = createApp(App);

// 注册Element Plus
app.use(ElementPlus);

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

// 导入自定义指令
import { setLoadingDirective } from './directives/index.js';
// 注册自定义指令
setLoadingDirective(app);

app.mount('#app');
